import Layout from '@/layout'
import RouteButtonsBuilder from '@/framework/infra/router/RouterButtonsBuilder'

export default [
  {
    path: '/wx',
    component: Layout,
    name: 'wx',
    meta: { title: '微信登录信息', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'user-info',
        name: 'wx-user-info',
        component: () => import('@/feature/wx/app/user-info/index'),
        meta: { title: '微信登录信息', icon: 'table' },
        buttons: RouteButtonsBuilder.builder('wx-user-info').curd()
          .build()
      },
      {
        path: 'user-info',
        component: () => import('@/feature/wx/app/user-info/index'),
        meta: { title: '微信登录信息', icon: 'table' },
        buttons: RouteButtonsBuilder.builder('wx:user-info')
          
          .addButtons([
              {
                handler: 'list',
                name: 'list',
                type: TableButtonType.SEARCHBAR,
                label: '搜索',
                icon: 'el-icon-search'
              },
              {
                handler: 'export',
                name: 'export',
                type: TableButtonType.TOOLBAR_RIGHT,
                label: '导出',
                buttonType: 'primary',
                icon: 'el-icon-download'
              },
              {
                handler: 'create',
                name: 'create',
                type: TableButtonType.TOOLBAR,
                label: '新建微信登录信息',
                icon: 'el-icon-plus'
              },
              {
                handler: 'update',
                name: 'update',
                type: TableButtonType.ROW,
                label: '修改',
                icon: 'el-icon-edit'
              },
              {
                handler: 'remove',
                name: 'remove',
                type: TableButtonType.ROW,
                label: '删除',
                buttonType: 'danger',
                icon: 'el-icon-delete'
              }
              
          ])
          .build()
      }
      // #appendSpot# 生成工具用，不要删了
    ]
  }
]
